let baseUrl = "https://4de16698-d9f4-443a-b416-ef1037cce952.bspapp.com/http";

export const myRequire = (url, method, data, header) => {
  return new Promise((resolve, reject) => {
    uni.request({
      url: baseUrl + url,
      method: method,
      data: data,
      header,
      success: (res) => {
        resolve(res.data);
      },
      fail: (err) => {
        // console.log(err.data);
        reject(err);
      },
    });
  });
};
